import communication from './communication';
import crud from './crud';
import state from './state';
import draggable from './draggable';
import fetch from './fetch';
import style from './style';
import animation from './animation';
import type { RouterRes } from '@/service/login/type';

export const menus: RouterRes[] = [
	{
		path: '/json-to-type',
		component: '/JsonToType/JsonToType',
		meta: { title: 'json转ts类型' }
	},
	{
		path: '/communication',
		component: null,
		meta: { title: '跨页面通信' },
		children: communication
	},
	{
		path: '/crud',
		component: null,
		meta: { title: '增删改查组件' },
		children: crud
	},
	{
		path: '/state',
		component: null,
		meta: { title: '状态管理方案' },
		children: state
	},
	{
		path: '/draggable',
		component: null,
		meta: { title: '拖拽库测试' },
		children: draggable
	},
	{
		path: '/fetch',
		component: null,
		meta: { title: 'fetch请求' },
		children: fetch
	},
	{
		path: '/style',
		component: null,
		meta: { title: '样式编写测试' },
		children: style
	},
	{
		path: '/js-api-test',
		component: '/JSApiTest/JSApiTest',
		meta: { title: 'JS api 测试' }
	},
	{
		path: '/animation',
		component: null,
		meta: { title: '动画' },
		children: animation
	},
	{ path: '/about', component: '/About/About', meta: { title: '关于项目' } }
];

// 独立窗口
export const features: RouterRes[] = [
	{
		path: '/target-blank',
		hidden: true,
		component: '/TargetBlank/TargetBlank',
		meta: { title: '测试内嵌独立窗口' }
	}
];
